/*
 * @Author: your name
 * @Date: 2021-01-23 08:29:06
 * @LastEditTime: 2021-01-23 17:36:15
 * @FilePath: \flutter_study\lib\pages\BoxDecoration_demo.dart
 */

import 'package:flutter/material.dart';

class BoxDecorationDemo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      decoration: BoxDecoration(
          image: DecorationImage(
              image: NetworkImage(
                  "https://resources.ninghao.org/images/gravity-falls.png"),
              repeat: ImageRepeat.noRepeat,
              fit: BoxFit.cover,
              colorFilter: ColorFilter.mode(Colors.yellow, BlendMode.dstIn))),
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        crossAxisAlignment: CrossAxisAlignment.center,
        children: <Widget>[
          Container(
            padding: EdgeInsets.all(16.0),
            margin: EdgeInsets.all(8.0),
            child: Icon(
              Icons.face,
              size: 60.0,
              color: Colors.white,
            ),
            decoration: BoxDecoration(
                color: Colors.deepPurple,
                // border: Border.all(width: 4.0, style: BorderStyle.solid, color: Colors.black),
                // borderRadius: BorderRadius.circular(20.0),
                shape: BoxShape.circle,
                gradient: LinearGradient(
                    colors: <Color>[Colors.pink, Colors.yellow],
                    begin: Alignment.topCenter,
                    end: Alignment.bottomCenter),
                boxShadow: <BoxShadow>[
                  BoxShadow(
                      color: Colors.red,
                      blurRadius: 10.0,
                      offset: Offset(6.0, 9.0))
                ]),
          )
        ],
      ),
    );
  }
}
